package com.hs.srm.admin.modules.orders.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.io.Serializable;

/**
 * 订单文件实体类
 *
 * @author ych
 * @since 2020-04-23 16:29:54
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("order_file")
public class OrderFileEntity implements Serializable {

    private static final long serialVersionUID = -98690809298127945L;

    @TableId(value = "pk_id", type = IdType.UUID)
    @TableField("pk_id")
    private String pkId;

    /**
    * 订单行项目id
    */
    @TableField("po_item_id")
    private String poItemId;

    /**
    * 文件名
    */
    @TableField("file_name")
    private String fileName;

    /**
    * 文件路径
    */
    @TableField("file_path")
    private String filePath;

    /**
    * 创建日期
    */
    @JSONField(format = "yyyy-MM-dd")
    @TableField("create_time")
    private Date createTime;

    public OrderFileEntity(String poItemId, String fileName, String filePath, Date createTime) {
        this.poItemId = poItemId;
        this.fileName = fileName;
        this.filePath = filePath;
        this.createTime = createTime;
    }
}